package com.itheima.health.mock;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.itheima.health.entity.Result;

import com.itheima.health.pojo.Member;
import com.itheima.health.pojo.Order;
import com.itheima.health.service.MemberService;
import com.itheima.health.service.OrderService;
import com.itheima.health.service.OrderSettingService;
import com.itheima.health.utils.date.DateUtils;
import com.itheima.health.utils.redis.RedisUtil;
import com.itheima.health.utils.resources.RedisMessageConstant;
import org.apache.commons.lang3.StringUtils;
import org.apache.dubbo.config.annotation.Reference;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;
import java.util.Date;
import java.util.Map;
import java.util.function.Function;


/**
 * @author 雪落
 * @date 2020/12/22 - 14:02
 * 压力测试页面
 */
@RestController
public class OrderServiceMock implements OrderService {
    @GetMapping("/pressure/Thetestpage")
    public Result test() {
        Result result = new Result();
        result.setMessage("下单失败，目前下单人数过多，请稍后再试！");
        return result;
    }

    @Override
    public Order add(Map map) {
        System.out.println("OrderServiceMock启动");
        test();
        System.out.println( "test();走完了");
        Order order = new Order();
        order.setQvyiyaliceshi(99);
        return order;
    }

    @Override
    public Map findOrderInfoById(Long id) {
        System.out.println("测试findOrderInfoById");
        return null;
    }



    @Override
    public boolean saveBatch(Collection<Order> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdateBatch(Collection<Order> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean updateBatchById(Collection<Order> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdate(Order entity) {
        return false;
    }

    @Override
    public Order getOne(Wrapper<Order> queryWrapper, boolean throwEx) {
        return null;
    }

    @Override
    public Map<String, Object> getMap(Wrapper<Order> queryWrapper) {
        return null;
    }

    @Override
    public <V> V getObj(Wrapper<Order> queryWrapper, Function<? super Object, V> mapper) {
        return null;
    }

    @Override
    public BaseMapper<Order> getBaseMapper() {
        return null;
    }
    @Override
    public Map payById(Long id) {
        return null;
    }

    @Override
    public Boolean checkOrderStatus(Long id) {
        return false;
    }
}
